<%@ page import="org.icress.fusion.moc.Tb" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="layout" content="main" />
    <g:set var="entityName" value="${message(code: 'moc.tb.label', default: 'Tb')}" />
    <title><g:message code="default.show.label" args="['\u5de5\u5355']" /></title>
</head>
<body>
    <div class="body">
        <h1><g:message code="default.show.label" args="[entityName]" /></h1>
        <g:if test="${flash.message}">
        <div class="message">${flash.message}</div>
        </g:if>
        <div class="dialog">
			<g:render template="/moc/tb/showTemplate" model="[tbInstance:tbInstance]" />
        </div>
        
        <div class="buttons">
             <g:form>
				<g:hiddenField name="id" value="${tbInstance?.id}" />
				<shiro:hasPermission permission="tb:create">
					<span class="button"><g:actionSubmit class="edit" action="edit" value="${message(code: 'default.button.edit.label', default: 'Edit')}" /></span>
				</shiro:hasPermission>
				<shiro:hasPermission permission="tb:delete">
					<span class="button"><g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" /></span>
				</shiro:hasPermission>
                <g:set var="tcEntityName" value="${message(code: 'moc.tc.label', default: 'Tc')}" />
                <shiro:hasPermission permission="tc:create">
                	<span class="menuButton"><g:link class="create" controller="tc" action="create" params="[tb_id:tbInstance?.id]"><g:message code="default.new.label" args="[tcEntityName]" /></g:link></span>
                </shiro:hasPermission>
             </g:form>
         </div>
        
        <br/>
     	<g:set var="entityNameTc" value="${message(code: 'moc.tc.label', default: 'Tc')}" />
     	<h1><g:message code="moc.tb.tcs.label" default="Tcs" /></h1>
        <div class="list">
			<g:render template="/moc/tc/listTemplate" model="[tcInstanceList:tbInstance.tcs]" />
        </div>                
    </div>
</body>
</html>
